package webbrow.search.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import webbrow.board.vo.ListVO;
import webbrow.search.model.SearchCommand;
import webbrow.search.model.SearchService;


@Controller
public class SearchController {
	@Resource(name="searchServiceImpl")
	private SearchService searchService;
	
	// 게시글 검색하기
	@RequestMapping("/searchByKeyword.inven")
	public ModelAndView searchByKeyword(SearchCommand command) throws Exception{	
		ListVO lvo = searchService.searchByKeyword(command);
		//System.out.println("search controller 서비스 실행 후 "+command);
		return new ModelAndView("search.tiles","lvo",lvo);	
	}
}
